
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Vue实例生命周期函数</title>
	</head>
	<body>
		<div id="root">
			
		</div>
		
		<script src="js/vue.js"></script>
		<script>
			let root = new Vue({
				el:'#root',
				template:'<h1>{{test}}</h1>',
				data:{
					test:'hello world'
				},
				beforeCreate:function(){
					console.log('beforeCreate');
				},
				created:function(){
					console.log('created');
				},
				beforeMount:function(){
					console.log('beforemound');
				},
				mounted:function(){
					console.log('mounted');
				},
				beforeDestroy:function(){
					console.log('beforeDestroy');
				},
				destroyed:function(){
					console.log('destroyed');
				},
				beforeUpdate:function(){
					console.log('beforeUpdate');
				},
				updated:function(){
					console.log('Updated');
				}
				
			})
		</script>
	</body>
</html>
